package model

import "time"

type UserCollect struct {
	UserCollectID int64     `json:"userCollectId" gorm:"column:user_collect_id;primary_key;auto_increment" binding:"-"`
	VideoID       int64     `json:"videoId" gorm:"column:video_id;not null" binding:"-"`
	UserID        int64     `json:"userId" gorm:"column:user_id;not null" binding:"-"`
	CreateDate    time.Time `json:"createDate" gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;autoCreateTime"`
}

func (UserCollect) TableName() string {
	return "user_collect"
}

type CollectAction struct {
	VideoID    int64 `json:"videoId" form:"videoId"`
	ActionType int64 `json:"actionType" form:"actionType"` // 1收藏 2取消收藏
}

type CollectVideoPage struct {
	UserCollect UserCollect
	Video       Video
}

type CollectMessage struct {
	VideoID    int64 `json:"videoId" form:"videoId"`
	UserID     int64 `json:"userId"`
	ActionType int64 `json:"actionType" form:"actionType"` // 1收藏 2取消收藏
}
